package Text4;
import java.util.*;
public class Main {
    public static int N = 100010, n, m, idx,k;
    public static int[] h = new int[N];
    public static int[] e = new int[N];
    public static int[] ne = new int[N];
    public static int[] d = new int[N];
    public static int[] top = new int[N];

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        m = scanner.nextInt();
        Arrays.fill(h,-1);
        for (int i = 0; i < m; i++) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            add(a, b);
            d[b]++;
        }
        if(topsort()){
            for (int i = 0; i < n; i++) {
                System.out.print(top[i]+" ");
            }
        }else {
            System.out.println(-1);
        }
    }

    private static boolean topsort() {
        Queue<Integer> q=new LinkedList<>();
        for (int i = 1; i <=n ; i++) {
            if(d[i]==0){
                q.offer(i);
            }
        }
        while(!q.isEmpty()){
            int t=q.poll();
            top[k++]=t;
            for (int i = h[t]; i!=-1 ; i=ne[i]) {
                int j=e[i];
                d[j]--;
                if(d[j]==0){
                    q.offer(j);
                }
            }
        }
        return k==n;
    }

    private static void add(int a, int b) {
        e[idx] = b;
        ne[idx] = h[a];
        h[a] = idx++;
    }
}
